/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rmi;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author Hippolyte
 */
public class CompteurImpl extends UnicastRemoteObject implements ICompteur {
    
    public CompteurImpl(int cpt) throws RemoteException {
        super();
        this.cpt = cpt;
    }
    
    private int cpt;

    @Override
    public void incremente() throws RemoteException {
        cpt++;
    }

    @Override
    public int getValue() throws RemoteException {
        return cpt;
    }
    
}
